Skip to content

Add csharp-ls as a new option#77

Merged
MrSubidubi merged 3 commits into
zed-extensions:mainfrom
rbstp:add-csharp-ls
Jun 4, 2026
Merged

Add csharp-ls as a new option#77
MrSubidubi merged 3 commits into
zed-extensions:mainfrom
rbstp:add-csharp-ls

Conversation

@rbstp

@rbstp rbstp commented May 5, 2026

Copy link
Copy Markdown
Contributor

Adds csharp-ls as a third language server option alongside OmniSharp and Roslyn. csharp-ls is an F#-based C# language server distributed as a dotnet tool NuGet package; it is unrelated to the deprecated SofusA/csharp-language-server wrapper referenced by #11 and #57. The naming overlap is unfortunate: the upstream project markets itself as csharp-ls precisely to reduce that confusion.

The use case is different from Roslyn. csharp-ls is a leaner alternative: cold start is faster, memory footprint is lower, and it stays responsive on small projects or quick edits where spinning up a full Roslyn workspace is overkill. Roslyn remains the right choice for the deepest Microsoft tooling; csharp-ls is for the case when you want something snappy.

To use it:

{
  "languages": {
    "CSharp": {
      "language_servers": ["csharp-ls", "!omnisharp", "!roslyn"]
    }
  }
}

It partially addresses #62, it is running better on my own M3 mac for smaller projects.

@cla-bot

cla-bot Bot commented May 5, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @rbstp on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@rbstp

rbstp commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label May 5, 2026
@cla-bot

cla-bot Bot commented May 5, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@rbstp rbstp force-pushed the add-csharp-ls branch from 3090bb1 to 89daaa1 Compare May 5, 2026 17:41
@MrSubidubi MrSubidubi changed the title feat(language server): add csharp-ls as a new option Add csharp-ls as a new option May 29, 2026

@MrSubidubi MrSubidubi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@MrSubidubi MrSubidubi merged commit d23b728 into zed-extensions:main Jun 4, 2026
5 checks passed
zed-zippy Bot added a commit to zed-industries/zed that referenced this pull request Jun 4, 2026
)

Cherry-pick of #58507 to preview

----
In preparation for zed-extensions/csharp#77

Release Notes:

- N/A

Co-authored-by: Finn Evers <finn@zed.dev>
mertkanakkoc pushed a commit to mertkanakkoc/zed that referenced this pull request Jun 4, 2026
zed-zippy Bot added a commit to zed-industries/zed that referenced this pull request Jun 4, 2026
Cherry-pick of #58507 to stable

----
In preparation for zed-extensions/csharp#77

Release Notes:

- N/A

Co-authored-by: Finn Evers <finn@zed.dev>
@jasensic

jasensic commented Jun 5, 2026

Copy link
Copy Markdown

Today I've noticed about this error message:

image

Solution: run command dotnet tool install -g csharp-ls to install it as global

@WhereIsW4ldo

Copy link
Copy Markdown

@jasensic my claude suggested to add these lines to the lsp configuration in the settings.json file:

"csharp-ls": {
      "binary": {
        // Workaround: latest Zed broke cwd resolution for the csharp extension's
        // relative DLL path on Windows. Point at the global tool (cwd-independent).
        // Installed via: dotnet tool install --global csharp-ls
        "path": "C:\\Users\\WaldoWautelet\\.dotnet\\tools\\csharp-ls.exe",
      },
    }

you then also have to install csharp-ls as a dotnet global tool.

@jasensic

jasensic commented Jun 5, 2026

Copy link
Copy Markdown

Installing csharp-ls as a dotnet global tool was enough. Now it is working.
Thanks @WhereIsW4ldo

TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants